<!DOCTYPE html>
<!-- saved from url=(0042)https://hichat.hisense.com/public/download -->
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        <meta
                name="viewport"
                content="width=device-width, initial-scale=1.0, user-scalable=no"
        />
        <meta name="format-detection" content="telephone=no" />
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <meta name="apple-mobile-web-app-status-bar-style" content="black" />
        <title>信天翁下载</title>
        <style>
            body,
            h1,
            h2,
            h3,
            em,
            span,
            a,
            td,
            form,
            input,
            select,
            textarea {
                margin: 0;
                padding: 0;
            }
            body {
                color: #000;
                height: 100%;
                background: #fff;
                background-image: url(./resources/backgroud-img.png);
                height: 100vh;
                overflow: hidden;
                background-size: 100% 100%;
                background-repeat: no-repeat;
                display: flex;
                justify-content: center;
                align-items: center;
            }
            /* .back-img {
  width: 375px;
  height: 724px;
} */

            img {
                border: none;
            }
            a {
                text-decoration: none;
                outline: none;
                -webkit-tap-highlight-color: rgba(255, 0, 0, 0);
            }
            div {
                height: auto;
            }
            .wrapper {
                height: 100%;
            }
            .content {
                height: 100%;
                position: relative;
            }
            .content img {
                max-width: 100%;
            }

            .show-tips {
                width: 100%;
                background: #fff;
                padding: 20px 30px;
                display: none;
            }
            .show-tips p {
                font-size: 18px;
                font-family: \5FAE\8F6F\96C5\9ED1;
                color: #000;
                font-weight: bold;
                line-height: 30px;
            }
            .jiantou {
                position: absolute;
                right: 12px;
                top: 12px;
            }

            .divone {
                background-image: url(./resources/bg-mobile.png);
                background-repeat: no-repeat;
                text-align: center;
                margin: 0 auto;
                background-size: 100%;
            }
            .alert {
                position: fixed;
                font-size: 12px;
                top: 2em;
                left: 50%;
                height: 3em;
                line-height: 3em;
                width: 16em;
                background-color: rgb(255, 165, 64);
                z-index: 200;
                margin-left: -8em;
                border-radius: 5px;
                text-align: center;
                display: none;
            }
            .back-img {
                width: 100%;
                height: auto;
            }
            .display-flex-row {
                display: flex;
                flex-direction: row;
            }
            .display-flex-column {
                display: flex;
                flex-direction: column;
            }
            .flex-center {
                justify-content: center;
                align-items: center;
            }
            .showTips {
                width: 100%;
                position: relative;
                display: none;
            }
            .showTips2 {
                width: 100%;
                position: relative;
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;
            }
            .showTips2 .back-img {
                width: 65.6%;
                height: auto;
                margin-top: -80px;
            }
            .showTips2 .btn-box {
                margin-top: 30px;
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;
                width: 100%;
            }
            .box-down {
                width: 53.3vw;
                max-width: 200px;
                border-radius: 22px;
                height: 44px;
                display: flex;
                font-weight: 500;
                font-size: 16px;
                color: #ffffff;
                display: flex;
                justify-content: center;
                align-items: center;
                background-color: #22bbb3;
            }
            .box-down + .box-down {
                margin-top: 18px;
            }
            .box-down .display-flex-row {
                display: flex;
                justify-content: center;
                align-items: center;
            }
            .box-down img {
                height: 16px;
                width: 16px;
                margin-right: 6px;
            }
            .font-content {
                font-size: 16px;
            }
        </style>
    </head>
    <body>
        <div class="showTips">
            <img class="back-img" src="./resources/back-ing1.png" />
        </div>
        <div class="showTips2" style="display: flex">
            <img class="back-img" src="./resources/xtwPhoneBg.png" />
            <div class="display-flex-row down-a btn-box" id="iPhoneDowns">
                <div class="box-down flex-center">
                    <div class="display-flex-row">
                        <img src="./resources/ios-icon.png" />
                        <div>IOS下载</div>
                    </div>
                </div>
                <div class="box-down flex-center" id="andriodDowns">
                    <a
                            style="display: block; width: 100%; height: 100%;text-align: center; line-height: 44px;"
                            class="display-flex-row flex-center"
                            href="./app/信天翁体验版v1.0.0.apk"
                            onclick="alert('确定下载后，请到文件管理器中安装');"
                    >
                        <img style="margin-right: 2px; transform: translateY(2px);" src="./resources/android-icon.png" />
                        <span style="color: #fff">安卓下载</span>
                    </a>
                </div>
            </div>
        </div>

        <div class="alert">请用苹果手机进行下载!</div>
        <input type="hidden" id="projectCode" value="hisense" />

        <script
                type="text/javascript"
                src="./resources/jquery-1.8.2.min.js"
        ></script>
        <script>
            function was_download() {
                const data_ = {
                    baseInfo: {
                        user_login_id: 'download', // 用户登录id账号，LDAP用户传ldap账号，非ldap账号传系统定义的用户账号，用户登录后必须传入
                        user_anon_id: 'download', // 访客唯一标识，每个唯一的访问者必须分配一个不同的ID，这个ID在分配后不建议更改，至少保证在一次会话内不会更改
                        user_is_ldap: false, // 标识用户是否是LDAP用户，用户登录后必须传入
                        site_id: "1362", // 站点site_id
                    },
                    event: [
                        {
                            // url: `${import.meta.env.VITE_APP_DOMAIN}/${toPage?.route}`, // 页面url
                            title: `app下载`, // 页面标题
                            time: new Date().getTime(), // 事件的触发日期时间，请传时间戳(毫秒与秒级都可以)，系统自动转换
                            event_code: "my_download_ck", // 事件编码
                        },
                    ],
                };
                $.ajax({
                    url: "https://was-gtw.hisense.com/data/api/collectData/3.gif",
                    type: "POST",
                    data: JSON.stringify(data_), // 如需发送 JSON
                    processData: false,
                    headers: {
                        // 显式设置请求头
                        "Content-Type": "application/json",
                        "X-Custom-Header": "value",
                        // "Cache-Control": "no-cache",
                        // "Pragma": "no-cache"
                    },
                });
            }
            function is_weixin() {
                var ua = navigator.userAgent.toLowerCase();
                if (
                    ua.match(/MicroMessenger/i) == "micromessenger" ||
                    (ua.match(/(iphone|ipod|ios|ipad)/i) &&
                        ua.indexOf("safari") < 0 &&
                        ua.indexOf("uni-app") < 0)
                ) {
                    return true;
                } else {
                    return false;
                }
            }

            function is_ios() {
                if (navigator.userAgent.match(/(iPhone|iPod|ios|iPad)/i)) {
                    return true;
                } else {
                    return false;
                }
            }

            if (is_weixin()) {
                $(".showTips").show();
                $(".showTips2").hide();
            } else {
                $(".showTips2").show().css("display", "flex");
                // if (is_ios()) {
                // 	$("#iPhoneDowns").show();
                // 	$("#andriodDowns").hide();
                // } else {
                // 	$("#iPhoneDowns").hide();
                // 	$("#andriodDowns").show();
                // }
                $("#iPhoneDowns").bind("click", function () {
                    //if (is_ios()) {
                    $.ajax({
                        url: "https://xtw.hisense.com/front/xtwerror/saveDownloadLog.api",
                        type: "POST",
                        contentType: "application/json; charset=utf-8", // 设置内容类型
                        data: JSON.stringify({
                            logType: "IOS",
                        }),
                        success: function (response) {
                            // 处理服务器响应
                            // console.log(response);
                        },
                        error: function (jqXHR, textStatus, errorThrown) {
                            // 处理请求失败
                            console.error("请求失败: " + textStatus, errorThrown);
                        },
                    });
                    //window.location.href = "itms-services:///?action=download-manifest&url=https://xtw.hisense.com/downloadapp/newxtw/app.plist";
                    window.location.href="https://apps.apple.com/cn/app/id1522636802";
                    was_download();
                    return true;
                    //} else {
                    //	$(".alert").show();
                    //	setTimeout(function () {
                    //		$(".alert").hide();
                    //	}, 4000);
                    //	return false;
                    //}

                    // if((navigator.userAgent.match(/(iPhone|iPod|ios|iPad)/i))){
                    // 	return true;
                    // }
                    // else{
                    // 	$(".alert").show()
                    // 	setTimeout(function(){
                    // 		$(".alert").hide()
                    // 	},4000)
                    // 	return false;
                    // }
                });

                $("#andriodDowns").bind("click", function () {
                    $.ajax({
                        url: "https://xtw.hisense.com/front/xtwerror/saveDownloadLog.api",
                        type: "POST",
                        contentType: "application/json; charset=utf-8", // 设置内容类型
                        data: JSON.stringify({
                            logType: "ANDROID",
                        }),
                        success: function (response) {
                            // 处理服务器响应
                            // console.log(response);
                        },
                        error: function (jqXHR, textStatus, errorThrown) {
                            // 处理请求失败
                            console.error("请求失败: " + textStatus, errorThrown);
                        },
                    });
                    was_download();
                    return true;
                });
            }
        </script>
    </body>
</html>
